package top.noteday.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import top.noteday.impl.VersionServiceImpl;
import top.noteday.provider.VersionService;

import java.util.Map;

@RestController
@RequestMapping(value = "/backstage/version")
public class VersionServiceController {

    @Autowired
    private VersionServiceImpl versionService;

    @GetMapping(value = "/url")
    public String getUrl(@RequestParam("obj") Object obj) {
        return versionService.getUrl(obj);
    }

    @PostMapping(value = "/post")
    public String demoPost(@RequestBody Map<String, String> map) {
        return versionService.demoPost(map);
    }
}
